<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>cls班级信息收集</title>
</head>
<body>
{# # clsname = models.CharField(max_length=20)#}
{#  #   stucount = models.IntegerField()  # student 总数#}
{#  #   lecturer = models.ForeignKey(Teacher, on_delete=models.SET_DEFAULT, related_name='lecturer', default='0')  # 讲师#}
{#  #   instructor = models.ForeignKey(Teacher, on_delete=models.SET_DEFAULT, related_name='instructor', default='1')  # 导员#}
{#  #   classno = models.CharField(max_length=10)#}
{#  #   subject = models.CharField(max_length=20)  # 专业#}
<form action="" method="post">
    {% csrf_token %}
    班级名称: <input type="text" name="clsname">
    <br>
    班级人数: <input type="text" name="stucount">
    <br>
    讲师姓名:
    <select name="lecturer" id="lecturer">
        {% for lecturer in lecturers %}
            <option value="{{ lecturer.id }}">{{ lecturer.name }}</option>
        {% endfor %}
    </select>
    <br>
    导员姓名:
 <select name="instructor" id="instructor">
        {% for instructor in instructors %}
            <option value="{{ instructor.id }}">{{ instructor.name }}</option>
        {% endfor %}
    </select>
    <br>
    房间号: <input type="text" name="classno">
    <br>
    所属专业: <input type="text" name="subject">
    <br>
    <input type="submit" value="提交">
</form>
</body>
</html>